<?php 

$pdo = new PDO('mysql:host=localhost;dbname=danmu;charset=utf8','root','');

$danmu=$_POST['danmu'];

$sql = "insert into danmu(danmu) values('".$danmu."')";

$num = $pdo->exec($sql);

echo $danmu;

?>
